package com.hjsmallfly.syllabus.bean;

import android.os.Parcel;
import android.os.Parcelable;
import com.google.gson.annotations.SerializedName;

public class SemesterData implements Parcelable {

    /**
     * year : 2018
     * semester : 1
     */

    @SerializedName("year")
    private int year;

    @SerializedName("semester")
    private int semester;

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public int getSemester() {
        return semester;
    }

    public void setSemester(int semester) {
        this.semester = semester;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.year);
        dest.writeInt(this.semester);
    }

    public SemesterData() {
    }

    protected SemesterData(Parcel in) {
        this.year = in.readInt();
        this.semester = in.readInt();
    }

    public SemesterData(int year, int semester) {
        this.year = year;
        this.semester = semester;
    }

    public static final Parcelable.Creator<SemesterData> CREATOR = new Parcelable.Creator<SemesterData>() {
        @Override
        public SemesterData createFromParcel(Parcel source) {
            return new SemesterData(source);
        }

        @Override
        public SemesterData[] newArray(int size) {
            return new SemesterData[size];
        }
    };
}
